# library import
import pandas as pd
import numpy as np
import random as rnd
# for data visualization
import seaborn as sns
import matplotlib.pyplot as plt
%matplotlib inline
import plotly.express as px
import warnings
warnings.filterwarnings(action = 'ignore')
df=pd.read_csv("D:/Prateek/Intersnship_Data/Dataset/Swiggy Bangalore Outlet Details.csv")
df
| Shop_Name | Cuisine | Location | Rating | Cost_for_Two | |
|---|---|---|---|---|---|
| 0 | Kanti Sweets | Sweets | Koramangala, Koramangala | 4.3 | ₹ 150 |
| 1 | Mumbai Tiffin | North Indian, Home Food, Thalis, Combo | Sector 5, HSR | 4.4 | ₹ 400 |
| 2 | Sri Krishna sagar | South Indian, North Indian, Fast Food, Beverag... | 6th Block, Koramangala | 4.1 | ₹ 126 |
| 3 | Al Daaz | American, Arabian, Chinese, Desserts, Fast Foo... | HSR, HSR | 4.4 | ₹ 400 |
| 4 | Beijing Bites | Chinese, Thai | 5th Block, Koramangala | 4.1 | ₹ 450 |
| ... | ... | ... | ... | ... | ... |
| 113 | Wok Paper Scissors | Pan-Asian, Chinese, Asian | JNC Road, Koramangala | 3.9 | ₹ 219 |
| 114 | Savoury Restaurant | Arabian, Middle Eastern, North Indian, Grill, ... | Madiwala, BTM | 4.1 | ₹ 600 |
| 115 | Royal Treat | North Indian, Chinese, Seafood, Biryani | 5th block Koramangala, Koramangala | 4.2 | ₹ 193 |
| 116 | Thali 99 | North Indian | Koramangala, Koramangala | 4.3 | ₹ 200 |
| 117 | Mani's Dum Biryani | Andhra, Biryani | 1st Block, Koramangala | 4.2 | ₹ 400 |
118 rows × 5 columns
df.describe()
| Shop_Name | Cuisine | Location | Rating | Cost_for_Two | |
|---|---|---|---|---|---|
| count | 118 | 118 | 118 | 118 | 118 |
| unique | 115 | 79 | 65 | 13 | 30 |
| top | Leon Grill | North Indian | BTM, BTM | 4.1 | ₹ 300 |
| freq | 2 | 12 | 13 | 30 | 16 |
df.info()
<class 'pandas.core.frame.DataFrame'> RangeIndex: 118 entries, 0 to 117 Data columns (total 5 columns): # Column Non-Null Count Dtype --- ------ -------------- ----- 0 Shop_Name 118 non-null object 1 Cuisine 118 non-null object 2 Location 118 non-null object 3 Rating 118 non-null object 4 Cost_for_Two 118 non-null object dtypes: object(5) memory usage: 4.7+ KB
df.isnull().sum()
Shop_Name 0 Cuisine 0 Location 0 Rating 0 Cost_for_Two 0 dtype: int64
df['Shop_Name'].unique()
array(['Kanti Sweets', 'Mumbai Tiffin', 'Sri Krishna sagar', 'Al Daaz',
'Beijing Bites', 'Kitchens of Punjab',
'99 VARIETY DOSA AND PAV BHAJI- Malli Mane Food Court',
"La Pino'z Pizza", 'Hotel Manu', 'Yumlane Pizza',
'Ambur Star Briyani', 'Cake Box', 'Meghana Foods', 'Momoz',
'A2B - Adyar Ananda Bhavan', 'Shawarma Inc',
'WarmOven Cake & Desserts', 'Sri Lakshmi Dhaba',
'Falahaar & Kota Kachori', 'Shree Khana Khazana',
'Just Bake - Cakes & confectioners', 'Maa Di Hatti',
'Hotel Godavari', 'Rolls On Wheels', 'New Udupi Grand',
'Swad Punjab da', 'Rice Bowl', 'High N Hungry', 'Burger King',
'Nandhana Palace', 'Easy Bites', 'Bengali Fun Foods',
'Madurai Idly Shop', 'Oottupura', 'Taco Bell',
'Hyderabadi Biryani Hub', 'Biriyani Zone', "Gongura's",
'Bathinda Junction', 'Leon Grill', "Venu's Donne Biryani",
'Cakewala', 'Swadista Aahar', 'Cream Stone',
'Svadu Pure Ghee Sweets', 'Sai Abhiruchi', 'Pizza Hut',
'Hyderabad Biryaani House', 'China Pearl', "Balaji's Veg",
'Onesta', 'Donne Biryani Mandi', 'FreshMenu',
'Donne Biryani House', 'Pipabu', 'Sharmas punjabi restaurant',
'KFC', 'Donne Biriyani House', "Nanda's", 'Sagar fast food',
'calicut cafe restaurant', 'Cake Garden', 'Biryanis and more',
'Biryani Khazana', '800 Momos', 'World of asia', 'Ghar Ka Khana',
'Thalassery Restaurant', 'KANNUR FOOD POINT', 'KANNOOR RESTAURANT',
'Fattoush', 'Nizams Biryani', 'Nagarjuna', 'Punjabi Rasoi',
'CRAVY WINGS - The American Diner', 'Barista',
'BIRIYANI TASTE MASTH(BTM)', 'Khichdi Experiment',
'Tandoori Merchant', 'Chinese Bae', 'Kitchens of China',
'Natural Ice Cream', 'Abhiruchi Hotel', 'Punjabi Swag', 'Truffles',
'Gyaani Da Punjabi Dhaba', 'Biriyani Bhatti', 'Khawa Karpo',
'99 VARIETY DOSA AND JUICE-Malli mane food court',
'Purani Dilli By Anand Sweets', 'XO Belgian Waffle',
'BIRYANI CRAFTS', 'Madeena Hotel', 'Corner House Ice Cream',
'NIC Natural Ice Creams', 'Just Shawarma',
'Mandya Gowdru Donne Biryani', 'Dindigul Thalapakatti Biriyani',
'Delhi Food Point', 'Mad Over Donuts', 'Village Donne Biriyani',
'R.B Food Point', 'Paradise Biryani', 'New Tasty Cafeteria',
'Junior Kuppanna', 'The Bowl Company',
'Hotel Savitha Family Restaurant', 'Biryani Pot', 'Bowl 99',
'Kritunga', 'Wok Paper Scissors', 'Savoury Restaurant',
'Royal Treat', 'Thali 99', "Mani's Dum Biryani"], dtype=object)
df.Shop_Name.value_counts()
Leon Grill 2
La Pino'z Pizza 2
Easy Bites 2
Falahaar & Kota Kachori 1
Ambur Star Briyani 1
..
Shawarma Inc 1
Onesta 1
Sharmas punjabi restaurant 1
Venu's Donne Biryani 1
Royal Treat 1
Name: Shop_Name, Length: 115, dtype: int64
df.Rating.unique()
array(['4.3', '4.4', '4.1', '4.2', '3.9', '3.8', '4', '3.7', '3.6', '4.8',
'4.5', '4.6', '--'], dtype=object)
df.dtypes
Shop_Name object Cuisine object Location object Rating object Cost_for_Two object dtype: object
df.Rating=df.Rating.str.replace('--','0').astype(float)
df.Rating.unique()
array([4.3, 4.4, 4.1, 4.2, 3.9, 3.8, 4. , 3.7, 3.6, 4.8, 4.5, 4.6, 0. ])
df.Cost_for_Two.unique()
array(['₹ 150', '₹ 400', '₹ 126', '₹ 450', '₹ 350', '₹ 200', '₹ 500',
'₹ 247', '₹ 550', '₹ 300', '₹ 129', '₹ 250', '₹ 268', '₹ 600',
'₹ 527', '₹ 130', '₹ 257', '₹ 280', '₹ 399', '₹ 220', '₹ 800',
'₹ 100', '₹ 178', '₹ 120', '₹ 251', '₹ 650', '₹ 132', '₹ 153',
'₹ 219', '₹ 193'], dtype=object)
a=df.Cost_for_Two
a.unique()
array(['₹ 150', '₹ 400', '₹ 126', '₹ 450', '₹ 350', '₹ 200', '₹ 500',
'₹ 247', '₹ 550', '₹ 300', '₹ 129', '₹ 250', '₹ 268', '₹ 600',
'₹ 527', '₹ 130', '₹ 257', '₹ 280', '₹ 399', '₹ 220', '₹ 800',
'₹ 100', '₹ 178', '₹ 120', '₹ 251', '₹ 650', '₹ 132', '₹ 153',
'₹ 219', '₹ 193'], dtype=object)
obj=lambda x:x[2:]
a=a.apply(obj)
a
0 150
1 400
2 126
3 400
4 450
...
113 219
114 600
115 193
116 200
117 400
Name: Cost_for_Two, Length: 118, dtype: object
a=a.astype(int)
a
0 150
1 400
2 126
3 400
4 450
...
113 219
114 600
115 193
116 200
117 400
Name: Cost_for_Two, Length: 118, dtype: int32
df.Cost_for_Two=a
df.Cost_for_Two
0 150
1 400
2 126
3 400
4 450
...
113 219
114 600
115 193
116 200
117 400
Name: Cost_for_Two, Length: 118, dtype: int32
df.info()
<class 'pandas.core.frame.DataFrame'> RangeIndex: 118 entries, 0 to 117 Data columns (total 5 columns): # Column Non-Null Count Dtype --- ------ -------------- ----- 0 Shop_Name 118 non-null object 1 Cuisine 118 non-null object 2 Location 118 non-null object 3 Rating 118 non-null float64 4 Cost_for_Two 118 non-null int32 dtypes: float64(1), int32(1), object(3) memory usage: 4.3+ KB
df.describe()
| Rating | Cost_for_Two | |
|---|---|---|
| count | 118.000000 | 118.000000 |
| mean | 4.061864 | 321.008475 |
| std | 0.430845 | 137.286804 |
| min | 0.000000 | 100.000000 |
| 25% | 4.000000 | 204.750000 |
| 50% | 4.100000 | 300.000000 |
| 75% | 4.300000 | 400.000000 |
| max | 4.800000 | 800.000000 |
Mean Rating for Swiggy is 4.061 which is good for Customers.
Average Cost for two person is approximately 321 rupees.
Max Rating and Cost for two is 4.8 and 800 rupees respectively.
#Shops that have minimum cost and maximum rating
df.sort_values(by='Rating', ascending=False).head()
| Shop_Name | Cuisine | Location | Rating | Cost_for_Two | |
|---|---|---|---|---|---|
| 78 | Khichdi Experiment | Home Food, Healthy Food, Indian | Koramangala, Koramangala | 4.8 | 200 |
| 94 | Corner House Ice Cream | Ice Cream, Desserts | 7th Block, Koramangala | 4.6 | 250 |
| 82 | Natural Ice Cream | Ice Cream | Near Wipro Park Signal, Koramangala | 4.6 | 150 |
| 80 | Chinese Bae | Chinese, Thai | BTM, BTM | 4.5 | 450 |
| 3 | Al Daaz | American, Arabian, Chinese, Desserts, Fast Foo... | HSR, HSR | 4.4 | 400 |
df.sort_values(by='Cost_for_Two').head()
| Shop_Name | Cuisine | Location | Rating | Cost_for_Two | |
|---|---|---|---|---|---|
| 79 | Tandoori Merchant | Andhra, Biryani, Chinese, Desserts, Fast Food,... | 4th Cross, BTM | 4.2 | 100 |
| 89 | 99 VARIETY DOSA AND JUICE-Malli mane food court | Fast Food, Juices, North Indian | Koramangala 1st block, Koramangala | 4.1 | 100 |
| 95 | NIC Natural Ice Creams | Ice Cream, Desserts | Koramangla, Koramangala | 4.2 | 120 |
| 2 | Sri Krishna sagar | South Indian, North Indian, Fast Food, Beverag... | 6th Block, Koramangala | 4.1 | 126 |
| 21 | Maa Di Hatti | Chinese, Healthy Food, North Indian | Jakkasandra Extn, Koramangala | 4.0 | 129 |
Most liked food is from Khichdi Experiment which have Home Food, Healthy Food, Indian cuisines and have highest rating of 4.8
Ice cream business is more liked in Koramangala
Minimum cost for two is From shop "Maa di Hatti"
plt.figure(figsize=(15,15))
plt.xticks(rotation=90)
sns.barplot(x=df.Shop_Name,y=df.Cost_for_Two)
<AxesSubplot:xlabel='Shop_Name', ylabel='Cost_for_Two'>
plt.figure(figsize=(15,15))
plt.xticks(rotation=90)
sns.barplot(x=df.Shop_Name,y=df.Rating)
<AxesSubplot:xlabel='Shop_Name', ylabel='Rating'>
df.Rating.describe()
count 118.000000 mean 4.061864 std 0.430845 min 0.000000 25% 4.000000 50% 4.100000 75% 4.300000 max 4.800000 Name: Rating, dtype: float64
df["Rating"].sort_values(ascending=True)
98 0.0
103 3.6
71 3.6
17 3.7
84 3.7
...
1 4.4
80 4.5
94 4.6
82 4.6
78 4.8
Name: Rating, Length: 118, dtype: float64
L=df.Location.unique()
L
array(['Koramangala, Koramangala', 'Sector 5, HSR',
'6th Block, Koramangala', 'HSR, HSR', '5th Block, Koramangala',
'Koramangala 4th Block, Koramangala', 'BTM 2nd Stage, BTM',
'BTM, BTM', '9th Main road, Koramangala', 'outer ring road, BTM',
'7th Block, Koramangala', '1st MAin, Koramangala',
'Bommanahalli, BTM', '6th block, Koramangala', 'Sector 4, HSR',
'BTM 1st stage, BTM', 'Jakkasandra Extn, Koramangala',
'Marutinagar Main Road, BTM', '1st Block, Koramangala',
'4th Cross, BTM', 'koramangala, Koramangala', 'BTM 2nd stage, BTM',
'3rd main, BTM', 'HSR 1st sector, HSR', 'Sector 7, HSR',
'3rd Sector, HSR', 'Chocolate Factory Road, BTM',
'16th Main Road, 2nd Stage, BTM', '1st Stage, BTM',
'Hosur Main Road, Koramangala',
'1st Cross Road, 5th Block, Near Jyothi Nivas College, Koramangala',
'Mico Layout, BTM', '4th Cross, Koramangala',
'4th Block, Koramangala', 'Intermediate Ring Road, Koramangala',
'3rd sector, HSR', '8TH BLOCK, Koramangala',
'4th b cross, Koramangala', 'SG palaya, BTM',
"Venkatapura Main Rd, Teacher's Colony, Jakkasandra, HSR",
'KHB Colony, Koramangala', 'Sector 3, HSR',
'Bannerghatta Road, Jayanagar',
'80 Feet Peripheral Road, Koramangala', 'Btm, BTM',
'Near Wipro Park Signal, Koramangala', '16th Main Road, BTM',
'2nd Stage, BTM', 'Kuvempu Nagar, Stage 2, BTM',
'Koramangala 1st block, Koramangala',
'5th Block Kormangala, Koramangala', 'Koramangla, Koramangala',
'5th block, Koramangala', '9th Main Rd, Sector 6, HSR Layout, HSR',
'Jay Bheema Nagar, BTM', 'Koramangala 6th block, Koramangala',
'Maruthi Nagar, BTM', 'Sector 6, HSR',
'Jakkasandra Village, Koramangala', '4th block, Koramangala',
'Madiwala Junction, BTM', 'kormangala, Koramangala',
'JNC Road, Koramangala', 'Madiwala, BTM',
'5th block Koramangala, Koramangala'], dtype=object)
loc=[]
def dis():
for i in df.Location:
loc.append(i.split(",")[-1])
return loc
l=dis()
l
[' Koramangala', ' HSR', ' Koramangala', ' HSR', ' Koramangala', ' Koramangala', ' BTM', ' BTM', ' HSR', ' Koramangala', ' BTM', ' Koramangala', ' Koramangala', ' Koramangala', ' Koramangala', ' Koramangala', ' Koramangala', ' BTM', ' Koramangala', ' HSR', ' BTM', ' Koramangala', ' BTM', ' Koramangala', ' HSR', ' BTM', ' Koramangala', ' BTM', ' Koramangala', ' Koramangala', ' Koramangala', ' BTM', ' Koramangala', ' BTM', ' Koramangala', ' BTM', ' HSR', ' HSR', ' Koramangala', ' HSR', ' BTM', ' HSR', ' BTM', ' Koramangala', ' BTM', ' BTM', ' Koramangala', ' Koramangala', ' Koramangala', ' BTM', ' Koramangala', ' BTM', ' Koramangala', ' Koramangala', ' Koramangala', ' Koramangala', ' Koramangala', ' HSR', ' HSR', ' Koramangala', ' BTM', ' HSR', ' Koramangala', ' Koramangala', ' Koramangala', ' BTM', ' BTM', ' Koramangala', ' BTM', ' BTM', ' BTM', ' HSR', ' Koramangala', ' HSR', ' Jayanagar', ' Koramangala', ' BTM', ' Koramangala', ' Koramangala', ' BTM', ' BTM', ' Koramangala', ' Koramangala', ' BTM', ' BTM', ' Koramangala', ' BTM', ' BTM', ' Koramangala', ' Koramangala', ' Koramangala', ' Koramangala', ' BTM', ' Koramangala', ' Koramangala', ' Koramangala', ' Koramangala', ' Koramangala', ' HSR', ' HSR', ' Koramangala', ' HSR', ' Koramangala', ' Koramangala', ' BTM', ' Koramangala', ' BTM', ' HSR', ' Koramangala', ' Koramangala', ' BTM', ' Koramangala', ' Koramangala', ' Koramangala', ' BTM', ' Koramangala', ' Koramangala', ' Koramangala']
a=set(l)
len(a)
4
a
{' BTM', ' HSR', ' Jayanagar', ' Koramangala'}
df["Area"]=l
df
| Shop_Name | Cuisine | Location | Rating | Cost_for_Two | Area | |
|---|---|---|---|---|---|---|
| 0 | Kanti Sweets | Sweets | Koramangala, Koramangala | 4.3 | 150 | Koramangala |
| 1 | Mumbai Tiffin | North Indian, Home Food, Thalis, Combo | Sector 5, HSR | 4.4 | 400 | HSR |
| 2 | Sri Krishna sagar | South Indian, North Indian, Fast Food, Beverag... | 6th Block, Koramangala | 4.1 | 126 | Koramangala |
| 3 | Al Daaz | American, Arabian, Chinese, Desserts, Fast Foo... | HSR, HSR | 4.4 | 400 | HSR |
| 4 | Beijing Bites | Chinese, Thai | 5th Block, Koramangala | 4.1 | 450 | Koramangala |
| ... | ... | ... | ... | ... | ... | ... |
| 113 | Wok Paper Scissors | Pan-Asian, Chinese, Asian | JNC Road, Koramangala | 3.9 | 219 | Koramangala |
| 114 | Savoury Restaurant | Arabian, Middle Eastern, North Indian, Grill, ... | Madiwala, BTM | 4.1 | 600 | BTM |
| 115 | Royal Treat | North Indian, Chinese, Seafood, Biryani | 5th block Koramangala, Koramangala | 4.2 | 193 | Koramangala |
| 116 | Thali 99 | North Indian | Koramangala, Koramangala | 4.3 | 200 | Koramangala |
| 117 | Mani's Dum Biryani | Andhra, Biryani | 1st Block, Koramangala | 4.2 | 400 | Koramangala |
118 rows × 6 columns
Area Koramangala
Koramangala = df[df['Area'] == ' Koramangala']
Koramangala
| Shop_Name | Cuisine | Location | Rating | Cost_for_Two | Area | |
|---|---|---|---|---|---|---|
| 0 | Kanti Sweets | Sweets | Koramangala, Koramangala | 4.3 | 150 | Koramangala |
| 2 | Sri Krishna sagar | South Indian, North Indian, Fast Food, Beverag... | 6th Block, Koramangala | 4.1 | 126 | Koramangala |
| 4 | Beijing Bites | Chinese, Thai | 5th Block, Koramangala | 4.1 | 450 | Koramangala |
| 5 | Kitchens of Punjab | North Indian | Koramangala 4th Block, Koramangala | 4.2 | 350 | Koramangala |
| 9 | Yumlane Pizza | Pizzas, Italian, Mexican | 9th Main road, Koramangala | 3.8 | 150 | Koramangala |
| ... | ... | ... | ... | ... | ... | ... |
| 112 | Kritunga | Andhra, Biryani | 5th Block, Koramangala | 3.9 | 500 | Koramangala |
| 113 | Wok Paper Scissors | Pan-Asian, Chinese, Asian | JNC Road, Koramangala | 3.9 | 219 | Koramangala |
| 115 | Royal Treat | North Indian, Chinese, Seafood, Biryani | 5th block Koramangala, Koramangala | 4.2 | 193 | Koramangala |
| 116 | Thali 99 | North Indian | Koramangala, Koramangala | 4.3 | 200 | Koramangala |
| 117 | Mani's Dum Biryani | Andhra, Biryani | 1st Block, Koramangala | 4.2 | 400 | Koramangala |
64 rows × 6 columns
Koramangala.describe()
| Rating | Cost_for_Two | |
|---|---|---|
| count | 64.000000 | 64.000000 |
| mean | 4.126563 | 297.828125 |
| std | 0.217666 | 134.319632 |
| min | 3.600000 | 100.000000 |
| 25% | 4.000000 | 200.000000 |
| 50% | 4.100000 | 254.000000 |
| 75% | 4.300000 | 399.250000 |
| max | 4.800000 | 600.000000 |
plt.figure(figsize=(10,10))
plt.xticks(rotation=90)
sns.barplot(x=Koramangala['Shop_Name'],y=Koramangala.Rating)
<AxesSubplot:xlabel='Shop_Name', ylabel='Rating'>
sns.histplot(Koramangala['Cost_for_Two'],bins=15)
<AxesSubplot:xlabel='Cost_for_Two', ylabel='Count'>
sns.histplot(Koramangala['Rating'],bins=10)
<AxesSubplot:xlabel='Rating', ylabel='Count'>
Area Jayanagar
Jayanagar = df[df['Area'] == ' Jayanagar']
Jayanagar
| Shop_Name | Cuisine | Location | Rating | Cost_for_Two | Area | |
|---|---|---|---|---|---|---|
| 74 | CRAVY WINGS - The American Diner | American, Fast Food | Bannerghatta Road, Jayanagar | 4.3 | 300 | Jayanagar |
Area HSR
HSR = df[df['Area'] == ' HSR']
HSR
| Shop_Name | Cuisine | Location | Rating | Cost_for_Two | Area | |
|---|---|---|---|---|---|---|
| 1 | Mumbai Tiffin | North Indian, Home Food, Thalis, Combo | Sector 5, HSR | 4.4 | 400 | HSR |
| 3 | Al Daaz | American, Arabian, Chinese, Desserts, Fast Foo... | HSR, HSR | 4.4 | 400 | HSR |
| 8 | Hotel Manu | South Indian, Kerala, Chinese, North Indian | HSR, HSR | 4.1 | 350 | HSR |
| 19 | Shree Khana Khazana | Indian, Rajasthani | Sector 4, HSR | 4.1 | 350 | HSR |
| 24 | New Udupi Grand | Chinese, Jain, North Indian, South Indian | HSR, HSR | 4.3 | 150 | HSR |
| 36 | Biriyani Zone | North Indian, Chinese, Biryani | HSR 1st sector, HSR | 4.1 | 600 | HSR |
| 37 | Gongura's | North Indian, Chinese, Biryani | Sector 7, HSR | 3.8 | 300 | HSR |
| 39 | Leon Grill | Turkish, Portuguese, American | 3rd Sector, HSR | 4.3 | 300 | HSR |
| 41 | Cakewala | Desserts | HSR, HSR | 4.3 | 450 | HSR |
| 57 | Donne Biriyani House | South Indian | 3rd sector, HSR | 4.0 | 300 | HSR |
| 58 | Nanda's | Andhra, Biryani | HSR, HSR | 4.0 | 400 | HSR |
| 61 | Cake Garden | Desserts, Bakery | HSR, HSR | 3.9 | 250 | HSR |
| 71 | Nizams Biryani | Biryani, Juices, Kebabs | Venkatapura Main Rd, Teacher's Colony, Jakkasa... | 3.6 | 200 | HSR |
| 73 | Punjabi Rasoi | North Indian | Sector 3, HSR | 4.0 | 800 | HSR |
| 98 | Mandya Gowdru Donne Biryani | Biryani | HSR, HSR | 0.0 | 350 | HSR |
| 99 | Dindigul Thalapakatti Biriyani | North Indian | HSR, HSR | 4.1 | 650 | HSR |
| 101 | Easy Bites | Snacks, American | 9th Main Rd, Sector 6, HSR Layout, HSR | 3.8 | 200 | HSR |
| 107 | Junior Kuppanna | Chettinad, South Indian | Sector 6, HSR | 4.0 | 550 | HSR |
HSR.describe()
| Rating | Cost_for_Two | |
|---|---|---|
| count | 18.000000 | 18.000000 |
| mean | 3.844444 | 388.888889 |
| std | 0.983524 | 169.389523 |
| min | 0.000000 | 150.000000 |
| 25% | 3.925000 | 300.000000 |
| 50% | 4.050000 | 350.000000 |
| 75% | 4.250000 | 437.500000 |
| max | 4.400000 | 800.000000 |
plt.figure(figsize=(10,10))
plt.xticks(rotation=90)
sns.barplot(x=HSR['Shop_Name'],y=HSR.Rating)
<AxesSubplot:xlabel='Shop_Name', ylabel='Rating'>
sns.histplot(HSR['Cost_for_Two'],bins=10)
<AxesSubplot:xlabel='Cost_for_Two', ylabel='Count'>
sns.histplot(HSR['Rating'],bins=10)
<AxesSubplot:xlabel='Rating', ylabel='Count'>
Area BTM
BTM = df[df['Area'] == ' BTM']
BTM
| Shop_Name | Cuisine | Location | Rating | Cost_for_Two | Area | |
|---|---|---|---|---|---|---|
| 6 | 99 VARIETY DOSA AND PAV BHAJI- Malli Mane Food... | Fast Food, North Indian, Chinese | BTM 2nd Stage, BTM | 4.1 | 200 | BTM |
| 7 | La Pino'z Pizza | Italian | BTM, BTM | 3.9 | 500 | BTM |
| 10 | Ambur Star Briyani | Chinese, South Indian, North Indian, Desserts,... | outer ring road, BTM | 4.1 | 500 | BTM |
| 17 | Sri Lakshmi Dhaba | North Indian | Bommanahalli, BTM | 3.7 | 200 | BTM |
| 20 | Just Bake - Cakes & confectioners | Desserts, Bakery | BTM 1st stage, BTM | 4.3 | 300 | BTM |
| 22 | Hotel Godavari | North Indian, Chinese, Hyderabadi | Marutinagar Main Road, BTM | 4.0 | 400 | BTM |
| 25 | Swad Punjab da | Indian | BTM, BTM | 4.1 | 250 | BTM |
| 27 | High N Hungry | Andhra, Biryani, Chinese, Desserts, Fast Food,... | 4th Cross, BTM | 4.1 | 350 | BTM |
| 31 | Bengali Fun Foods | North Indian | BTM 2nd stage, BTM | 4.2 | 300 | BTM |
| 33 | Oottupura | Kerala, South Indian | BTM, BTM | 4.3 | 268 | BTM |
| 35 | Hyderabadi Biryani Hub | North Indian, Chinese, Biryani | 3rd main, BTM | 3.9 | 450 | BTM |
| 40 | Venu's Donne Biryani | Biryani | Chocolate Factory Road, BTM | 4.3 | 300 | BTM |
| 42 | Swadista Aahar | South Indian, Snacks, North Indian, Chinese | 16th Main Road, 2nd Stage, BTM | 4.1 | 250 | BTM |
| 44 | Svadu Pure Ghee Sweets | Desserts, Fast Food, Sweets, Chaat | 1st Stage, BTM | 4.1 | 200 | BTM |
| 45 | Sai Abhiruchi | Chinese, South Indian, Andhra, Hyderabadi | BTM, BTM | 3.7 | 250 | BTM |
| 49 | Balaji's Veg | North Indian, Chinese, South Indian | Mico Layout, BTM | 4.1 | 300 | BTM |
| 51 | Donne Biryani Mandi | Biryani, Andhra, South Indian | BTM, BTM | 4.0 | 150 | BTM |
| 60 | calicut cafe restaurant | Fast Food, Beverages | BTM, BTM | 4.1 | 280 | BTM |
| 65 | World of asia | Beverages, Chinese | BTM, BTM | 4.0 | 250 | BTM |
| 66 | Ghar Ka Khana | North Indian | BTM, BTM | 4.2 | 220 | BTM |
| 68 | KANNUR FOOD POINT | Kerala, Chinese | SG palaya, BTM | 3.9 | 300 | BTM |
| 69 | KANNOOR RESTAURANT | North Indian, Chinese | BTM, BTM | 4.0 | 250 | BTM |
| 70 | Fattoush | Arabian, Beverages, Biryani, Chinese, Desserts... | BTM, BTM | 3.9 | 400 | BTM |
| 76 | BIRIYANI TASTE MASTH(BTM) | North Indian, South Indian | Btm, BTM | 4.2 | 300 | BTM |
| 79 | Tandoori Merchant | Andhra, Biryani, Chinese, Desserts, Fast Food,... | 4th Cross, BTM | 4.2 | 100 | BTM |
| 80 | Chinese Bae | Chinese, Thai | BTM, BTM | 4.5 | 450 | BTM |
| 83 | Abhiruchi Hotel | Chinese, Hyderabadi, Biryani, Indian, South In... | BTM, BTM | 4.0 | 250 | BTM |
| 84 | Punjabi Swag | Punjabi, North Indian, Chinese, Fast Food, Hea... | 16th Main Road, BTM | 3.7 | 400 | BTM |
| 86 | Gyaani Da Punjabi Dhaba | North Indian | 2nd Stage, BTM | 4.0 | 500 | BTM |
| 87 | Biriyani Bhatti | Biryani, Hyderabadi, Andhra, North Indian, Sou... | Kuvempu Nagar, Stage 2, BTM | 4.1 | 350 | BTM |
| 92 | BIRYANI CRAFTS | Indian | BTM, BTM | 4.1 | 500 | BTM |
| 104 | R.B Food Point | Chinese, North Indian | Jay Bheema Nagar, BTM | 3.7 | 350 | BTM |
| 106 | New Tasty Cafeteria | Andhra, Chettinad, Chinese, Mughlai, North Indian | Maruthi Nagar, BTM | 4.0 | 350 | BTM |
| 110 | Biryani Pot | North Indian, Biryani | Madiwala Junction, BTM | 4.0 | 500 | BTM |
| 114 | Savoury Restaurant | Arabian, Middle Eastern, North Indian, Grill, ... | Madiwala, BTM | 4.1 | 600 | BTM |
HSR.describe()
| Rating | Cost_for_Two | |
|---|---|---|
| count | 18.000000 | 18.000000 |
| mean | 3.844444 | 388.888889 |
| std | 0.983524 | 169.389523 |
| min | 0.000000 | 150.000000 |
| 25% | 3.925000 | 300.000000 |
| 50% | 4.050000 | 350.000000 |
| 75% | 4.250000 | 437.500000 |
| max | 4.400000 | 800.000000 |
plt.figure(figsize=(10,10))
plt.xticks(rotation=90)
sns.barplot(x=BTM['Shop_Name'],y=BTM.Rating)
<AxesSubplot:xlabel='Shop_Name', ylabel='Rating'>
sns.histplot(BTM['Cost_for_Two'],bins=10)
<AxesSubplot:xlabel='Cost_for_Two', ylabel='Count'>
sns.histplot(BTM['Rating'],bins=10)
<AxesSubplot:xlabel='Rating', ylabel='Count'>
As we can see that the Area-wise Rating & Cost for Two varies as following:
BTM : Most has 4.0 to 4.2 Rating and Approx. Cost for Two People lies between 200 to 350. (Max. Cost goes upto 600)
HSR : Most has 4 or above Rating and Approx. Cost for Two People lies between 300 to 400. (Max. Cost goes upto 800)
Koramangala : Most has 4.0 to 4.3 Rating and Approx. Cost for Two People lies between 200 to 350. (Max. Cost goes upto 600)
With this we can conclude the Most Costly Area is HSR
Revenue={}
Revenue['BTM']=BTM['Cost_for_Two'].sum()
Revenue['HSR']=HSR['Cost_for_Two'].sum()
Revenue['Jayanagar']=Jayanagar['Cost_for_Two'].sum()
Revenue['Koramangala']=Koramangala['Cost_for_Two'].sum()
Re=Revenue.values()
city=Revenue.keys()
Revenue=pd.DataFrame()
Revenue['Revenue'] = Re
Revenue['City'] = city
Revenue
| Revenue | City | |
|---|---|---|
| 0 | 11518 | BTM |
| 1 | 7000 | HSR |
| 2 | 300 | Jayanagar |
| 3 | 19061 | Koramangala |
sns.barplot(x=Revenue['City'], y=Revenue['Revenue'],data=Revenue)
plt.xlabel('Revenue ------>',fontsize=15)
plt.ylabel('City ------>',fontsize=15)
plt.show()
sns.countplot(df.Area)
plt.title("Number of shop In Area")
Text(0.5, 1.0, 'Number of shop In Area')
Maximum Revenue is from Koramangala and Maximum number of shops are from Koramangala
df.Cuisine
0 Sweets
1 North Indian, Home Food, Thalis, Combo
2 South Indian, North Indian, Fast Food, Beverag...
3 American, Arabian, Chinese, Desserts, Fast Foo...
4 Chinese, Thai
...
113 Pan-Asian, Chinese, Asian
114 Arabian, Middle Eastern, North Indian, Grill, ...
115 North Indian, Chinese, Seafood, Biryani
116 North Indian
117 Andhra, Biryani
Name: Cuisine, Length: 118, dtype: object
w=df.Cuisine.unique()
w
array(['Sweets', 'North Indian, Home Food, Thalis, Combo',
'South Indian, North Indian, Fast Food, Beverages, Jain',
'American, Arabian, Chinese, Desserts, Fast Food, Mughlai, North Indian',
'Chinese, Thai', 'North Indian',
'Fast Food, North Indian, Chinese', 'Italian',
'South Indian, Kerala, Chinese, North Indian',
'Pizzas, Italian, Mexican',
'Chinese, South Indian, North Indian, Desserts, Fast Food, Kerala, Andhra, Beverages, Mughlai, Seafood',
'Desserts', 'Chinese, Andhra, Biryani, Seafood', 'Chinese',
'South Indian, Chinese, Desserts, North Indian',
'Arabian, Fast Food', 'Desserts, Beverages', 'Indian, Rajasthani',
'Desserts, Bakery', 'Chinese, Healthy Food, North Indian',
'North Indian, Chinese, Hyderabadi', 'Fast Food',
'Chinese, Jain, North Indian, South Indian', 'Indian',
'North Indian, South Indian, Chinese',
'Andhra, Biryani, Chinese, Desserts, Fast Food, Seafood, South Indian',
'American, Fast Food',
'Biryani, Seafood, North Indian, Chinese, Desserts, Andhra, South Indian',
'Snacks, American', 'South Indian', 'Kerala, South Indian',
'Mexican', 'North Indian, Chinese, Biryani',
'Turkish, Portuguese, American', 'Biryani',
'South Indian, Snacks, North Indian, Chinese',
'Desserts, Fast Food, Sweets, Chaat',
'Chinese, South Indian, Andhra, Hyderabadi', 'Pizzas, Fast Food',
'Biryani, Mughlai, South Indian', 'Chinese, Asian',
'North Indian, Chinese, South Indian', 'Italian, Desserts, Pizzas',
'Biryani, Andhra, South Indian',
'Chinese, Continental, Italian, Mediterranean, Thai, Lebanese, American, Asian, Beverages, Bakery, Biryani, Cafe, Desserts, Healthy Food, Mexican, North Indian, Salads, Pizzas',
'Pizzas, Chinese, Pastas, Salads, American, Continental',
'Andhra, Biryani',
'Chinese, South Indian, North Indian, Fast Food',
'Fast Food, Beverages',
'Biryani, South Indian, North Indian, Fast Food, Andhra, Beverages, Mughlai, Seafood, Punjabi, Hyderabadi, Chinese',
'Beverages, Chinese',
'South Indian, Biryani, Kerala, North Indian, Chinese',
'Kerala, Chinese', 'North Indian, Chinese',
'Arabian, Beverages, Biryani, Chinese, Desserts, North Indian',
'Biryani, Juices, Kebabs', 'Andhra, South Indian',
'Beverages, Cafe, Snacks', 'North Indian, South Indian',
'Turkish, Portuguese, American, Grill',
'Home Food, Healthy Food, Indian', 'Ice Cream',
'Chinese, Hyderabadi, Biryani, Indian, South Indian, Andhra, Tandoor',
'Punjabi, North Indian, Chinese, Fast Food, Healthy Food, Mughlai, Desserts',
'American',
'Biryani, Hyderabadi, Andhra, North Indian, South Indian',
'Fast Food, Juices, North Indian',
'North Indian, Chaat, Snacks, Fast Food',
'Desserts, Mughlai, Seafood', 'Ice Cream, Desserts',
'Chinese, North Indian', 'Biryani, Kebabs',
'Andhra, Chettinad, Chinese, Mughlai, North Indian',
'Chettinad, South Indian',
'Continental, Indian, Pan-Asian, Oriental',
'North Indian, Biryani', 'Pan-Asian, Chinese, Asian',
'Arabian, Middle Eastern, North Indian, Grill, Seafood, Kerala, Chinese',
'North Indian, Chinese, Seafood, Biryani'], dtype=object)
cu=[]
for i in w:
e=i.split(",")
for j in e:
if j[0]==" ":
j=j[1:]
if j not in cu:
cu.append(j)
cu
['Sweets', 'North Indian', 'Home Food', 'Thalis', 'Combo', 'South Indian', 'Fast Food', 'Beverages', 'Jain', 'American', 'Arabian', 'Chinese', 'Desserts', 'Mughlai', 'Thai', 'Italian', 'Kerala', 'Pizzas', 'Mexican', 'Andhra', 'Seafood', 'Biryani', 'Indian', 'Rajasthani', 'Bakery', 'Healthy Food', 'Hyderabadi', 'Snacks', 'Turkish', 'Portuguese', 'Chaat', 'Asian', 'Continental', 'Mediterranean', 'Lebanese', 'Cafe', 'Salads', 'Pastas', 'Punjabi', 'Juices', 'Kebabs', 'Grill', 'Ice Cream', 'Tandoor', 'Chettinad', 'Pan-Asian', 'Oriental', 'Middle Eastern']
dict_Cuisine = {}
for i in df['Cuisine'].unique():
Cuisines_Lists = i.split(',')
for Cuisine in Cuisines_Lists:
Cuisine =Cuisine.lstrip(" ")
if Cuisine in dict_Cuisine:
dict_Cuisine[Cuisine] = dict_Cuisine[Cuisine] + 1
else:
dict_Cuisine[Cuisine] = 1
print(dict_Cuisine)
print()
print('Total Records: \t', len( dict_Cuisine))
{'Sweets': 2, 'North Indian': 32, 'Home Food': 2, 'Thalis': 1, 'Combo': 1, 'South Indian': 23, 'Fast Food': 16, 'Beverages': 9, 'Jain': 2, 'American': 8, 'Arabian': 4, 'Chinese': 35, 'Desserts': 15, 'Mughlai': 7, 'Thai': 2, 'Italian': 4, 'Kerala': 6, 'Pizzas': 5, 'Mexican': 3, 'Andhra': 12, 'Seafood': 8, 'Biryani': 18, 'Indian': 5, 'Rajasthani': 1, 'Bakery': 2, 'Healthy Food': 4, 'Hyderabadi': 5, 'Snacks': 4, 'Turkish': 2, 'Portuguese': 2, 'Chaat': 2, 'Asian': 3, 'Continental': 3, 'Mediterranean': 1, 'Lebanese': 1, 'Cafe': 2, 'Salads': 2, 'Pastas': 1, 'Punjabi': 2, 'Juices': 2, 'Kebabs': 2, 'Grill': 2, 'Ice Cream': 2, 'Tandoor': 1, 'Chettinad': 2, 'Pan-Asian': 2, 'Oriental': 1, 'Middle Eastern': 1}
Total Records: 48
Cuisine = dict_Cuisine.keys()
freq = dict_Cuisine.values()
df_Cuisine_Analysis = pd.DataFrame()
df_Cuisine_Analysis['Cuisine'] = Cuisine
df_Cuisine_Analysis['Count'] = freq
df_Cuisine_Analysis
| Cuisine | Count | |
|---|---|---|
| 0 | Sweets | 2 |
| 1 | North Indian | 32 |
| 2 | Home Food | 2 |
| 3 | Thalis | 1 |
| 4 | Combo | 1 |
| 5 | South Indian | 23 |
| 6 | Fast Food | 16 |
| 7 | Beverages | 9 |
| 8 | Jain | 2 |
| 9 | American | 8 |
| 10 | Arabian | 4 |
| 11 | Chinese | 35 |
| 12 | Desserts | 15 |
| 13 | Mughlai | 7 |
| 14 | Thai | 2 |
| 15 | Italian | 4 |
| 16 | Kerala | 6 |
| 17 | Pizzas | 5 |
| 18 | Mexican | 3 |
| 19 | Andhra | 12 |
| 20 | Seafood | 8 |
| 21 | Biryani | 18 |
| 22 | Indian | 5 |
| 23 | Rajasthani | 1 |
| 24 | Bakery | 2 |
| 25 | Healthy Food | 4 |
| 26 | Hyderabadi | 5 |
| 27 | Snacks | 4 |
| 28 | Turkish | 2 |
| 29 | Portuguese | 2 |
| 30 | Chaat | 2 |
| 31 | Asian | 3 |
| 32 | Continental | 3 |
| 33 | Mediterranean | 1 |
| 34 | Lebanese | 1 |
| 35 | Cafe | 2 |
| 36 | Salads | 2 |
| 37 | Pastas | 1 |
| 38 | Punjabi | 2 |
| 39 | Juices | 2 |
| 40 | Kebabs | 2 |
| 41 | Grill | 2 |
| 42 | Ice Cream | 2 |
| 43 | Tandoor | 1 |
| 44 | Chettinad | 2 |
| 45 | Pan-Asian | 2 |
| 46 | Oriental | 1 |
| 47 | Middle Eastern | 1 |
plt.figure(figsize = (20, 8))
sns.barplot(x = df_Cuisine_Analysis['Cuisine'],
y = df_Cuisine_Analysis['Count'],
data = df_Cuisine_Analysis)
plt.xticks(rotation = 90)
plt.title('Cuisines Overall Analysis (Bangalore)', fontsize = 14, fontweight = 'bold', fontstyle = 'italic')
plt.xlabel('Cuisine', fontsize = 11, fontweight = 'bold')
plt.ylabel('Number of Restaurants', fontsize = 11, fontweight = 'bold')
plt.show()
df_Cuisine_sort=df_Cuisine_Analysis.sort_values(by='Count',ascending=False).head(10)
df_Cuisine_sort
| Cuisine | Count | |
|---|---|---|
| 11 | Chinese | 35 |
| 1 | North Indian | 32 |
| 5 | South Indian | 23 |
| 21 | Biryani | 18 |
| 6 | Fast Food | 16 |
| 12 | Desserts | 15 |
| 19 | Andhra | 12 |
| 7 | Beverages | 9 |
| 9 | American | 8 |
| 20 | Seafood | 8 |
plt.pie(df_Cuisine_sort['Count'],labels=df_Cuisine_sort['Cuisine'],autopct='%.2f%%')
plt.show()
BTM Area
BTM_cuisine=BTM["Cuisine"]
BTM_cuisine
6 Fast Food, North Indian, Chinese 7 Italian 10 Chinese, South Indian, North Indian, Desserts,... 17 North Indian 20 Desserts, Bakery 22 North Indian, Chinese, Hyderabadi 25 Indian 27 Andhra, Biryani, Chinese, Desserts, Fast Food,... 31 North Indian 33 Kerala, South Indian 35 North Indian, Chinese, Biryani 40 Biryani 42 South Indian, Snacks, North Indian, Chinese 44 Desserts, Fast Food, Sweets, Chaat 45 Chinese, South Indian, Andhra, Hyderabadi 49 North Indian, Chinese, South Indian 51 Biryani, Andhra, South Indian 60 Fast Food, Beverages 65 Beverages, Chinese 66 North Indian 68 Kerala, Chinese 69 North Indian, Chinese 70 Arabian, Beverages, Biryani, Chinese, Desserts... 76 North Indian, South Indian 79 Andhra, Biryani, Chinese, Desserts, Fast Food,... 80 Chinese, Thai 83 Chinese, Hyderabadi, Biryani, Indian, South In... 84 Punjabi, North Indian, Chinese, Fast Food, Hea... 86 North Indian 87 Biryani, Hyderabadi, Andhra, North Indian, Sou... 92 Indian 104 Chinese, North Indian 106 Andhra, Chettinad, Chinese, Mughlai, North Indian 110 North Indian, Biryani 114 Arabian, Middle Eastern, North Indian, Grill, ... Name: Cuisine, dtype: object
BTM_dict={}
for i in BTM_cuisine:
k=i.split(",")
for j in k:
j = j.lstrip(' ')
if j in BTM_dict:
BTM_dict[j]=BTM_dict[j]+1
else:
BTM_dict[j]=1
print(BTM_dict)
print()
print('Total Records of BTM: \t', len(BTM_dict))
{'Fast Food': 7, 'North Indian': 19, 'Chinese': 19, 'Italian': 1, 'South Indian': 11, 'Desserts': 7, 'Kerala': 4, 'Andhra': 8, 'Beverages': 4, 'Mughlai': 3, 'Seafood': 4, 'Bakery': 1, 'Hyderabadi': 4, 'Indian': 3, 'Biryani': 9, 'Snacks': 1, 'Sweets': 1, 'Chaat': 1, 'Arabian': 2, 'Thai': 1, 'Tandoor': 1, 'Punjabi': 1, 'Healthy Food': 1, 'Chettinad': 1, 'Middle Eastern': 1, 'Grill': 1}
Total Records of BTM: 26
Cuisine_BTM = BTM_dict.keys()
freq_BTM = BTM_dict.values()
dict_BTM = {
'Cuisine' : Cuisine_BTM,
'Count' : freq_BTM
}
BTM_Cuisine= pd.DataFrame(dict_BTM)
BTM_Cuisine
| Cuisine | Count | |
|---|---|---|
| 0 | Fast Food | 7 |
| 1 | North Indian | 19 |
| 2 | Chinese | 19 |
| 3 | Italian | 1 |
| 4 | South Indian | 11 |
| 5 | Desserts | 7 |
| 6 | Kerala | 4 |
| 7 | Andhra | 8 |
| 8 | Beverages | 4 |
| 9 | Mughlai | 3 |
| 10 | Seafood | 4 |
| 11 | Bakery | 1 |
| 12 | Hyderabadi | 4 |
| 13 | Indian | 3 |
| 14 | Biryani | 9 |
| 15 | Snacks | 1 |
| 16 | Sweets | 1 |
| 17 | Chaat | 1 |
| 18 | Arabian | 2 |
| 19 | Thai | 1 |
| 20 | Tandoor | 1 |
| 21 | Punjabi | 1 |
| 22 | Healthy Food | 1 |
| 23 | Chettinad | 1 |
| 24 | Middle Eastern | 1 |
| 25 | Grill | 1 |
plt.figure(figsize = (20, 8))
sns.barplot(x = BTM_Cuisine['Cuisine'],
y = BTM_Cuisine['Count'],
data = BTM_Cuisine)
plt.xticks(rotation = 90)
plt.title('Cuisines Analysis - BTM', fontsize = 14, fontweight = 'bold', fontstyle = 'italic')
plt.xlabel('Cuisine', fontsize = 11, fontweight = 'bold')
plt.ylabel('Number of Restaurants', fontsize = 11, fontweight = 'bold')
plt.show()
cu_BTM=BTM_Cuisine.sort_values(by="Count",ascending=False)
cu_BTM
| Cuisine | Count | |
|---|---|---|
| 2 | Chinese | 19 |
| 1 | North Indian | 19 |
| 4 | South Indian | 11 |
| 14 | Biryani | 9 |
| 7 | Andhra | 8 |
| 0 | Fast Food | 7 |
| 5 | Desserts | 7 |
| 12 | Hyderabadi | 4 |
| 6 | Kerala | 4 |
| 8 | Beverages | 4 |
| 10 | Seafood | 4 |
| 13 | Indian | 3 |
| 9 | Mughlai | 3 |
| 18 | Arabian | 2 |
| 11 | Bakery | 1 |
| 3 | Italian | 1 |
| 15 | Snacks | 1 |
| 16 | Sweets | 1 |
| 17 | Chaat | 1 |
| 19 | Thai | 1 |
| 20 | Tandoor | 1 |
| 21 | Punjabi | 1 |
| 22 | Healthy Food | 1 |
| 23 | Chettinad | 1 |
| 24 | Middle Eastern | 1 |
| 25 | Grill | 1 |
fig = px.pie(data_frame = cu_BTM,
names = cu_BTM['Cuisine'],
values = cu_BTM['Count'],
title = 'Distribution of Cuisines in Area BTM Restaurants')
fig.update_traces(textposition = 'inside', textinfo = 'percent+label')
fig.show()
From the above Visualizations, We can say, In BTM Area, Most of the Resturants sell "Chinese" which is around '16.4%' followed by "North Indian" & "South Indian" Cuisines which are around '16.4%' & '9.48%'.
So, We can also infer that Most of the people are fond of these Cusines.
Area HSR
HSR_cuisine=HSR["Cuisine"]
HSR_cuisine
1 North Indian, Home Food, Thalis, Combo 3 American, Arabian, Chinese, Desserts, Fast Foo... 8 South Indian, Kerala, Chinese, North Indian 19 Indian, Rajasthani 24 Chinese, Jain, North Indian, South Indian 36 North Indian, Chinese, Biryani 37 North Indian, Chinese, Biryani 39 Turkish, Portuguese, American 41 Desserts 57 South Indian 58 Andhra, Biryani 61 Desserts, Bakery 71 Biryani, Juices, Kebabs 73 North Indian 98 Biryani 99 North Indian 101 Snacks, American 107 Chettinad, South Indian Name: Cuisine, dtype: object
HSR_dict={}
for i in HSR_cuisine:
k=i.split(",")
for j in k:
j = j.lstrip(' ')
if j in HSR_dict:
HSR_dict[j]=HSR_dict[j]+1
else:
HSR_dict[j]=1
print(HSR_dict)
print()
print('Total Records of HSR: \t', len(HSR_dict))
{'North Indian': 8, 'Home Food': 1, 'Thalis': 1, 'Combo': 1, 'American': 3, 'Arabian': 1, 'Chinese': 5, 'Desserts': 3, 'Fast Food': 1, 'Mughlai': 1, 'South Indian': 4, 'Kerala': 1, 'Indian': 1, 'Rajasthani': 1, 'Jain': 1, 'Biryani': 5, 'Turkish': 1, 'Portuguese': 1, 'Andhra': 1, 'Bakery': 1, 'Juices': 1, 'Kebabs': 1, 'Snacks': 1, 'Chettinad': 1}
Total Records of HSR: 24
Cuisine_HSR = HSR_dict.keys()
freq_HSR= HSR_dict.values()
dict_HSR = {
'Cuisine' : Cuisine_HSR,
'Count' : freq_HSR
}
HSR_Cuisine= pd.DataFrame(dict_HSR)
HSR_Cuisine
| Cuisine | Count | |
|---|---|---|
| 0 | North Indian | 8 |
| 1 | Home Food | 1 |
| 2 | Thalis | 1 |
| 3 | Combo | 1 |
| 4 | American | 3 |
| 5 | Arabian | 1 |
| 6 | Chinese | 5 |
| 7 | Desserts | 3 |
| 8 | Fast Food | 1 |
| 9 | Mughlai | 1 |
| 10 | South Indian | 4 |
| 11 | Kerala | 1 |
| 12 | Indian | 1 |
| 13 | Rajasthani | 1 |
| 14 | Jain | 1 |
| 15 | Biryani | 5 |
| 16 | Turkish | 1 |
| 17 | Portuguese | 1 |
| 18 | Andhra | 1 |
| 19 | Bakery | 1 |
| 20 | Juices | 1 |
| 21 | Kebabs | 1 |
| 22 | Snacks | 1 |
| 23 | Chettinad | 1 |
plt.figure(figsize = (20, 8))
sns.barplot(x = HSR_Cuisine['Cuisine'],
y = HSR_Cuisine['Count'],
data = HSR_Cuisine)
plt.xticks(rotation = 90)
plt.title('Cuisines Analysis - HSR', fontsize = 14, fontweight = 'bold', fontstyle = 'italic')
plt.xlabel('Cuisine', fontsize = 11, fontweight = 'bold')
plt.ylabel('Number of Restaurants', fontsize = 11, fontweight = 'bold')
plt.show()
cu_HSR=HSR_Cuisine.sort_values(by="Count",ascending=False)
cu_HSR
| Cuisine | Count | |
|---|---|---|
| 0 | North Indian | 8 |
| 6 | Chinese | 5 |
| 15 | Biryani | 5 |
| 10 | South Indian | 4 |
| 4 | American | 3 |
| 7 | Desserts | 3 |
| 14 | Jain | 1 |
| 22 | Snacks | 1 |
| 21 | Kebabs | 1 |
| 20 | Juices | 1 |
| 19 | Bakery | 1 |
| 18 | Andhra | 1 |
| 17 | Portuguese | 1 |
| 16 | Turkish | 1 |
| 12 | Indian | 1 |
| 13 | Rajasthani | 1 |
| 1 | Home Food | 1 |
| 11 | Kerala | 1 |
| 9 | Mughlai | 1 |
| 8 | Fast Food | 1 |
| 5 | Arabian | 1 |
| 3 | Combo | 1 |
| 2 | Thalis | 1 |
| 23 | Chettinad | 1 |
fig = px.pie(data_frame = cu_HSR,
names = cu_HSR['Cuisine'],
values = cu_HSR['Count'],
title = 'Distribution of Cuisines in Area HSR Restaurants')
fig.update_traces(textposition = 'inside', textinfo = 'percent+label')
fig.show()
We can say, In HSR Area, "North Indian" Cuisines are dominated by around '17.4%' followed by "Chinese" & "South Indian" Cuisines '10.9%' & '8.7%' Restaurants respectively.
In HSR Area, We may have more "North Indian" people staying there.
Koramangala Area
Koramangala_cuisine=Koramangala["Cuisine"]
Koramangala_cuisine
0 Sweets
2 South Indian, North Indian, Fast Food, Beverag...
4 Chinese, Thai
5 North Indian
9 Pizzas, Italian, Mexican
...
112 Andhra, Biryani
113 Pan-Asian, Chinese, Asian
115 North Indian, Chinese, Seafood, Biryani
116 North Indian
117 Andhra, Biryani
Name: Cuisine, Length: 64, dtype: object
Koramangala_dict={}
for i in Koramangala_cuisine:
k=i.split(",")
for j in k:
j = j.lstrip(' ')
if j in Koramangala_dict:
Koramangala_dict[j]=Koramangala_dict[j]+1
else:
Koramangala_dict[j]=1
print(Koramangala_dict)
print()
print('Total Records of HSR: \t', len(Koramangala_dict))
{'Sweets': 1, 'South Indian': 13, 'North Indian': 20, 'Fast Food': 11, 'Beverages': 5, 'Jain': 1, 'Chinese': 18, 'Thai': 2, 'Pizzas': 5, 'Italian': 4, 'Mexican': 3, 'Desserts': 12, 'Andhra': 6, 'Biryani': 12, 'Seafood': 5, 'Arabian': 1, 'Healthy Food': 3, 'American': 7, 'Snacks': 3, 'Mughlai': 3, 'Asian': 3, 'Continental': 3, 'Mediterranean': 1, 'Lebanese': 1, 'Bakery': 1, 'Cafe': 2, 'Salads': 2, 'Pastas': 1, 'Punjabi': 1, 'Hyderabadi': 1, 'Kerala': 1, 'Turkish': 1, 'Portuguese': 1, 'Grill': 1, 'Home Food': 1, 'Indian': 2, 'Ice Cream': 3, 'Juices': 1, 'Chaat': 1, 'Kebabs': 1, 'Pan-Asian': 2, 'Oriental': 1}
Total Records of HSR: 42
Cuisine_Koramangala = Koramangala_dict.keys()
freq_Koramangala= Koramangala_dict.values()
dict_Koramangala = {
'Cuisine' : Cuisine_Koramangala,
'Count' : freq_Koramangala
}
Koramangala_Cuisine= pd.DataFrame(dict_Koramangala)
Koramangala_Cuisine
| Cuisine | Count | |
|---|---|---|
| 0 | Sweets | 1 |
| 1 | South Indian | 13 |
| 2 | North Indian | 20 |
| 3 | Fast Food | 11 |
| 4 | Beverages | 5 |
| 5 | Jain | 1 |
| 6 | Chinese | 18 |
| 7 | Thai | 2 |
| 8 | Pizzas | 5 |
| 9 | Italian | 4 |
| 10 | Mexican | 3 |
| 11 | Desserts | 12 |
| 12 | Andhra | 6 |
| 13 | Biryani | 12 |
| 14 | Seafood | 5 |
| 15 | Arabian | 1 |
| 16 | Healthy Food | 3 |
| 17 | American | 7 |
| 18 | Snacks | 3 |
| 19 | Mughlai | 3 |
| 20 | Asian | 3 |
| 21 | Continental | 3 |
| 22 | Mediterranean | 1 |
| 23 | Lebanese | 1 |
| 24 | Bakery | 1 |
| 25 | Cafe | 2 |
| 26 | Salads | 2 |
| 27 | Pastas | 1 |
| 28 | Punjabi | 1 |
| 29 | Hyderabadi | 1 |
| 30 | Kerala | 1 |
| 31 | Turkish | 1 |
| 32 | Portuguese | 1 |
| 33 | Grill | 1 |
| 34 | Home Food | 1 |
| 35 | Indian | 2 |
| 36 | Ice Cream | 3 |
| 37 | Juices | 1 |
| 38 | Chaat | 1 |
| 39 | Kebabs | 1 |
| 40 | Pan-Asian | 2 |
| 41 | Oriental | 1 |
plt.figure(figsize = (20, 8))
sns.barplot(x = Koramangala_Cuisine['Cuisine'],
y = Koramangala_Cuisine['Count'],
data =Koramangala_Cuisine)
plt.xticks(rotation = 90)
plt.title('Cuisines Analysis - HSR', fontsize = 14, fontweight = 'bold', fontstyle = 'italic')
plt.xlabel('Cuisine', fontsize = 11, fontweight = 'bold')
plt.ylabel('Number of Restaurants', fontsize = 11, fontweight = 'bold')
plt.show()
cu_Koramangala=Koramangala_Cuisine.sort_values(by="Count",ascending=False)
cu_Koramangala
| Cuisine | Count | |
|---|---|---|
| 2 | North Indian | 20 |
| 6 | Chinese | 18 |
| 1 | South Indian | 13 |
| 13 | Biryani | 12 |
| 11 | Desserts | 12 |
| 3 | Fast Food | 11 |
| 17 | American | 7 |
| 12 | Andhra | 6 |
| 4 | Beverages | 5 |
| 8 | Pizzas | 5 |
| 14 | Seafood | 5 |
| 9 | Italian | 4 |
| 36 | Ice Cream | 3 |
| 20 | Asian | 3 |
| 19 | Mughlai | 3 |
| 18 | Snacks | 3 |
| 21 | Continental | 3 |
| 16 | Healthy Food | 3 |
| 10 | Mexican | 3 |
| 26 | Salads | 2 |
| 7 | Thai | 2 |
| 35 | Indian | 2 |
| 40 | Pan-Asian | 2 |
| 25 | Cafe | 2 |
| 33 | Grill | 1 |
| 34 | Home Food | 1 |
| 39 | Kebabs | 1 |
| 37 | Juices | 1 |
| 38 | Chaat | 1 |
| 31 | Turkish | 1 |
| 32 | Portuguese | 1 |
| 0 | Sweets | 1 |
| 30 | Kerala | 1 |
| 29 | Hyderabadi | 1 |
| 28 | Punjabi | 1 |
| 27 | Pastas | 1 |
| 24 | Bakery | 1 |
| 23 | Lebanese | 1 |
| 22 | Mediterranean | 1 |
| 15 | Arabian | 1 |
| 5 | Jain | 1 |
| 41 | Oriental | 1 |
fig = px.pie(data_frame = cu_HSR,
names = cu_Koramangala['Cuisine'],
values = cu_Koramangala['Count'],
title = 'Distribution of Cuisines in Area Koramangala Restaurants')
fig.update_traces(textposition = 'inside', textinfo = 'percent+label')
fig.show()
We can say, In Koramangala Area, "North Indian" Cuisines are dominated by around '12%' followed by "Chinese" Cuisine is 10.8% & "South Indian" Cuisine is 7.78%
So, We can also infer that Most of the people are fond of the "North Indian" Cuisine
df
| Shop_Name | Cuisine | Location | Rating | Cost_for_Two | Area | |
|---|---|---|---|---|---|---|
| 0 | Kanti Sweets | Sweets | Koramangala, Koramangala | 4.3 | 150 | Koramangala |
| 1 | Mumbai Tiffin | North Indian, Home Food, Thalis, Combo | Sector 5, HSR | 4.4 | 400 | HSR |
| 2 | Sri Krishna sagar | South Indian, North Indian, Fast Food, Beverag... | 6th Block, Koramangala | 4.1 | 126 | Koramangala |
| 3 | Al Daaz | American, Arabian, Chinese, Desserts, Fast Foo... | HSR, HSR | 4.4 | 400 | HSR |
| 4 | Beijing Bites | Chinese, Thai | 5th Block, Koramangala | 4.1 | 450 | Koramangala |
| ... | ... | ... | ... | ... | ... | ... |
| 113 | Wok Paper Scissors | Pan-Asian, Chinese, Asian | JNC Road, Koramangala | 3.9 | 219 | Koramangala |
| 114 | Savoury Restaurant | Arabian, Middle Eastern, North Indian, Grill, ... | Madiwala, BTM | 4.1 | 600 | BTM |
| 115 | Royal Treat | North Indian, Chinese, Seafood, Biryani | 5th block Koramangala, Koramangala | 4.2 | 193 | Koramangala |
| 116 | Thali 99 | North Indian | Koramangala, Koramangala | 4.3 | 200 | Koramangala |
| 117 | Mani's Dum Biryani | Andhra, Biryani | 1st Block, Koramangala | 4.2 | 400 | Koramangala |
118 rows × 6 columns
df['Cuisine']
0 Sweets
1 North Indian, Home Food, Thalis, Combo
2 South Indian, North Indian, Fast Food, Beverag...
3 American, Arabian, Chinese, Desserts, Fast Foo...
4 Chinese, Thai
...
113 Pan-Asian, Chinese, Asian
114 Arabian, Middle Eastern, North Indian, Grill, ...
115 North Indian, Chinese, Seafood, Biryani
116 North Indian
117 Andhra, Biryani
Name: Cuisine, Length: 118, dtype: object
df_Swiggy_Text = ', '.join(df['Cuisine'])
df_Swiggy_Text
'Sweets, North Indian, Home Food, Thalis, Combo, South Indian, North Indian, Fast Food, Beverages, Jain, American, Arabian, Chinese, Desserts, Fast Food, Mughlai, North Indian, Chinese, Thai, North Indian, Fast Food, North Indian, Chinese, Italian, South Indian, Kerala, Chinese, North Indian, Pizzas, Italian, Mexican, Chinese, South Indian, North Indian, Desserts, Fast Food, Kerala, Andhra, Beverages, Mughlai, Seafood, Desserts, Chinese, Andhra, Biryani, Seafood, Chinese, South Indian, Chinese, Desserts, North Indian, Arabian, Fast Food, Desserts, Beverages, North Indian, North Indian, Indian, Rajasthani, Desserts, Bakery, Chinese, Healthy Food, North Indian, North Indian, Chinese, Hyderabadi, Fast Food, Chinese, Jain, North Indian, South Indian, Indian, North Indian, South Indian, Chinese, Andhra, Biryani, Chinese, Desserts, Fast Food, Seafood, South Indian, American, Fast Food, Biryani, Seafood, North Indian, Chinese, Desserts, Andhra, South Indian, Snacks, American, North Indian, South Indian, Kerala, South Indian, Mexican, North Indian, Chinese, Biryani, North Indian, Chinese, Biryani, North Indian, Chinese, Biryani, North Indian, Turkish, Portuguese, American, Biryani, Desserts, South Indian, Snacks, North Indian, Chinese, Desserts, Desserts, Fast Food, Sweets, Chaat, Chinese, South Indian, Andhra, Hyderabadi, Pizzas, Fast Food, Biryani, Mughlai, South Indian, Chinese, Asian, North Indian, Chinese, South Indian, Italian, Desserts, Pizzas, Biryani, Andhra, South Indian, Chinese, Continental, Italian, Mediterranean, Thai, Lebanese, American, Asian, Beverages, Bakery, Biryani, Cafe, Desserts, Healthy Food, Mexican, North Indian, Salads, Pizzas, Biryani, Pizzas, Chinese, Pastas, Salads, American, Continental, North Indian, American, Fast Food, South Indian, Andhra, Biryani, Chinese, South Indian, North Indian, Fast Food, Fast Food, Beverages, Desserts, Bakery, Biryani, South Indian, North Indian, Fast Food, Andhra, Beverages, Mughlai, Seafood, Punjabi, Hyderabadi, Chinese, Biryani, Chinese, Beverages, Chinese, North Indian, South Indian, Biryani, Kerala, North Indian, Chinese, Kerala, Chinese, North Indian, Chinese, Arabian, Beverages, Biryani, Chinese, Desserts, North Indian, Biryani, Juices, Kebabs, Andhra, South Indian, North Indian, American, Fast Food, Beverages, Cafe, Snacks, North Indian, South Indian, Turkish, Portuguese, American, Grill, Home Food, Healthy Food, Indian, Andhra, Biryani, Chinese, Desserts, Fast Food, Seafood, South Indian, Chinese, Thai, Chinese, Ice Cream, Chinese, Hyderabadi, Biryani, Indian, South Indian, Andhra, Tandoor, Punjabi, North Indian, Chinese, Fast Food, Healthy Food, Mughlai, Desserts, American, North Indian, Biryani, Hyderabadi, Andhra, North Indian, South Indian, Chinese, Fast Food, Juices, North Indian, North Indian, Chaat, Snacks, Fast Food, Desserts, Indian, Desserts, Mughlai, Seafood, Ice Cream, Desserts, Ice Cream, Desserts, Fast Food, Italian, Biryani, North Indian, North Indian, Snacks, American, Desserts, South Indian, Chinese, North Indian, Biryani, Kebabs, Andhra, Chettinad, Chinese, Mughlai, North Indian, Chettinad, South Indian, Continental, Indian, Pan-Asian, Oriental, North Indian, South Indian, North Indian, Biryani, North Indian, South Indian, Andhra, Biryani, Pan-Asian, Chinese, Asian, Arabian, Middle Eastern, North Indian, Grill, Seafood, Kerala, Chinese, North Indian, Chinese, Seafood, Biryani, North Indian, Andhra, Biryani'
from wordcloud import WordCloud
import nltk
from nltk.corpus import stopwords
import warnings
warnings.filterwarnings(action = 'ignore')
stopwords_ENG = set(stopwords.words('english'))
stopwords_ENG
{'a',
'about',
'above',
'after',
'again',
'against',
'ain',
'all',
'am',
'an',
'and',
'any',
'are',
'aren',
"aren't",
'as',
'at',
'be',
'because',
'been',
'before',
'being',
'below',
'between',
'both',
'but',
'by',
'can',
'couldn',
"couldn't",
'd',
'did',
'didn',
"didn't",
'do',
'does',
'doesn',
"doesn't",
'doing',
'don',
"don't",
'down',
'during',
'each',
'few',
'for',
'from',
'further',
'had',
'hadn',
"hadn't",
'has',
'hasn',
"hasn't",
'have',
'haven',
"haven't",
'having',
'he',
'her',
'here',
'hers',
'herself',
'him',
'himself',
'his',
'how',
'i',
'if',
'in',
'into',
'is',
'isn',
"isn't",
'it',
"it's",
'its',
'itself',
'just',
'll',
'm',
'ma',
'me',
'mightn',
"mightn't",
'more',
'most',
'mustn',
"mustn't",
'my',
'myself',
'needn',
"needn't",
'no',
'nor',
'not',
'now',
'o',
'of',
'off',
'on',
'once',
'only',
'or',
'other',
'our',
'ours',
'ourselves',
'out',
'over',
'own',
're',
's',
'same',
'shan',
"shan't",
'she',
"she's",
'should',
"should've",
'shouldn',
"shouldn't",
'so',
'some',
'such',
't',
'than',
'that',
"that'll",
'the',
'their',
'theirs',
'them',
'themselves',
'then',
'there',
'these',
'they',
'this',
'those',
'through',
'to',
'too',
'under',
'until',
'up',
've',
'very',
'was',
'wasn',
"wasn't",
'we',
'were',
'weren',
"weren't",
'what',
'when',
'where',
'which',
'while',
'who',
'whom',
'why',
'will',
'with',
'won',
"won't",
'wouldn',
"wouldn't",
'y',
'you',
"you'd",
"you'll",
"you're",
"you've",
'your',
'yours',
'yourself',
'yourselves'}
wordcloud = WordCloud(width = 1000, height = 500, stopwords = stopwords_ENG, background_color = 'white').generate(df_Swiggy_Text)
plt.figure(figsize = (22, 7))
plt.imshow(wordcloud)
plt.axis('off')
plt.show()
# Save the Image in the 'img' Folder:
wordcloud.to_file("D:/Prateek/Cuisines.png")
<wordcloud.wordcloud.WordCloud at 0x14507f790a0>